/*
** my_power_rec.c for my_power_rec in /home/chassa_m/rendu/Piscine-C-Jour_05
** 
** Made by chassa_m
** Login   <chassa_m@epitech.net>
** 
** Started on  Sun Oct  6 17:53:18 2013 chassa_m
** Last update Sun Oct 27 07:58:40 2013 chassa_m
*/

int	my_power_rec(int nb, int power)
{
  int	x;

  x = 0;
  if (power < 0)
    return (0);
  else if (power == 0)
    return (1);
  else if (power == 1)
    return (nb);
  else if (power > 1)
    {
      x = my_power_rec(nb, (power - 1));
      return (x * nb);
    }
  else
    return (nb);
}
